﻿using UnityEngine;
using System.Collections;

public class Rocket1 : MonoBehaviour {

    //子弹的速度
    public float rocket_Speed = 10;
	//子弹的威力
    public int rocket_Power = 1;
    //子弹生存时间
    protected float rocket_Timer = 1;
    Transform m_Transform;

	void Start () {
        m_Transform = this.transform;
        Destroy(this.gameObject, rocket_Timer);
	}

	
	void Update () {
       m_Transform.Translate(0, -rocket_Speed * Time.deltaTime, 0);
	}

    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag.CompareTo("Bounds2") == 0)
        {
			Destroy(this.gameObject);
		}
    }
}
